Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Programmer's Overview / Part 1 - Getting Started With QuickDraw GX
Chapter 2 - A Quick & Easy Sample Program


Setting the Pen Width of the Curve

Your curve shape's style property contains a reference to its style object, which contains properties that influence the drawing of a shape, such as pen width, dashing, patterns, and so on.

One simple way to change the pen width of your curve object is to call the GXSetShapePen function:

GXSetShapePen(aCurveShape, ff(10));
You pass a reference to your curve shape as the first parameter to the GXSetShapePen function and you specify the new pen width as the second parameter.

The GXSetShapePen function

  1. locates the style object associated with your curve object
  2. sets the value of the style objects's pen width property to 10.0

Figure 2-4 shows the effect a pen width of 10.0 has on your curve shape.

Figure 2-4 A curve modified by a thick pen width

It is important to understand that QuickDraw GX applies this effect when drawing your curve shape. The GXSetShapePen function affects only the value of the pen width property of your curve shape's style object. This function doesn't affect your curve's geometry and the function has no visual effect until you draw the shape.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996